package com.senven.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author zsy
 * @since 2022-09-05
 */
@TableName("pay_order")
@ApiModel(value = "PayOrder对象", description = "")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PayOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单编号")
    @TableId(value = "po_id", type = IdType.AUTO)
    private Integer poId;

    @ApiModelProperty("店铺编号")
    private Integer bid;

    @ApiModelProperty("商品编号")
    private Integer gid;

    @ApiModelProperty("商品价格")
    private Integer money;

    @ApiModelProperty("商品数量")
    private Integer num;

    @ApiModelProperty("用户id")
    private String uid;

    @ApiModelProperty("购物车id")
    private Integer stId;

    @ApiModelProperty("逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic(value = "0",delval = "1")
    @TableField(value = "is_deleted")
    private Boolean isDeleted;

    private String goodsname;
    private String branchname;
    private String gprice;
    private String goodsUrl;


    @TableField(exist = false)
    private String orderId;



    public PayOrder(Integer poId, Integer bid, Integer gid, Integer money, Integer num, Boolean isDeleted) {
        this.poId = poId;
        this.bid = bid;
        this.gid = gid;
        this.money = money;
        this.num = num;
        this.isDeleted = isDeleted;
    }

    public PayOrder(Integer poId, Integer bid, Integer gid, Integer money, Integer num, String uid, Boolean isDeleted,Integer stId) {
        this.poId = poId;
        this.bid = bid;
        this.gid = gid;
        this.money = money;
        this.num = num;
        this.uid = uid;
        this.isDeleted = isDeleted;
        this.stId = stId;
    }
}
